<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<title>北京赛车用户投注历史</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta content="Copyright ©com 版权所有" name="copyright">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/all_new.css" />
		<link rel="shortcut icon" type="image/x-icon"
			href="<%=basePath%>favicon.ico" />
		<script type="text/javascript">var basePath = "<%=basePath%>";</script>	
		<script type="text/javascript" src="<%=basePath%>js/jquery.min.js?20161126"></script>
		<script type="text/javascript" src="<%=basePath%>js/layer/layer.js?20161126"></script>
		<script type="text/javascript" src="<%=basePath%>js/Tool.js?20161129"></script>
	</head>
	<body id="bodyModule" class="skin_brown">
		<div style="" class="conLeft" id="conLeft">
			<div class="logo">
				<img src="<%=basePath%>images/logo_sscgb_20160513174944.png"
					width="150" />
			</div>
			<div class="left-content">
				<div class="left_corll">
					<div class="main-nav">
						<p style="width: 210px; margin: 0pt auto;">
							<span> <a href="<%=basePath%>user/user_tz" title="">下注状况</a></span> |
							<span class="on"> <a href="<%=basePath%>cathectic/cathectic_history">两周情况</a></span> |
							<span> <a href="<%=basePath%>user/user_history">帐户历史</a></span> 
							<span> <a href="<%=basePath%>win/win_num_list" title="">开奖结果</a></span> |
							<span> <a href="<%=basePath%>user/user_news" title="">个人资讯</a></span> |
							<span> <a href="<%=basePath%>user/pk_rule" title="">游戏规则</a> </span> 
							<span> <a href="<%=basePath%>user/password" title="">修改密码</a> </span> |
							<span> <a href="<%=basePath%>user/logout" title="">退出系统</a></span>
						</p>
					</div>
					<div style="" id="leftLoader">
						<div id="side_left" class="side_left">
							<div id="leftUser">
								<span id="autoRefreshspan" class="hidden"></span>
								<div id="accountInfo" class="accountInfo">
									<table class="struct_table_accountInfo  bg_white dataArea"
										cellspacing="0">
										<colgroup>
											<col class="col1">
											<col class="col2">
										</colgroup>
										<tbody>
											<tr>
												<td class="inner_text">
													用户帐号：
												</td>
												<td id="account">
													<em>${sessionUser.userNo}</em>
												</td>
											</tr>
											<tr>
												<td class="inner_text">
													信用额度：
												</td>
												<td id="credit">
													<em>${sessionUser.creditAmt}</em>
												</td>
											</tr>
											<tr>
												<td class="inner_text">
													信用余额：
												</td>
												<td class="bold" id="re_credit">
													<em>${sessionUser.userBalance}</em>
												</td>
											</tr>
											<tr>
												<td class="inner_text">
													已下金额：
												</td>
												<td id="total_amount1">
													<em></em>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div id="newOrder" class="box new-order">
									<ul id="refresh_title">
										<li class="new_fresh_title">
											最新注单
										</li>
										<li class="rushBtn">
											<a id="rushBtn" class=" btn_r elem_btn btn"
												href="javascript:void(0)">刷新</a>
										</li>
									</ul>
									<div class="neworderListBox">
										<table class="struct_table_newOrder" cellspacing="0">
											<colgroup>
												<col class="col1">
												<col class="col2">
												<col class="col3">
												<col class="col4">
											</colgroup>
											<thead><tr class="sub_title bg_deep_blue"><td>号码</td><td>赔率</td><td>金额</td><td>时间</td></tr></thead>
											<tbody id="openData" class="openData"></tbody>
										</table>
									</div>
								</div>
								<div id="wangzhandh">
									<table class="struct_table_accountInfo  bg_white dataArea w100"
										cellspacing="0">
										<colgroup>
											<col class="col1">
											<col class="col2">
										</colgroup>
										<tbody>
											<tr id="office_site">
												<td colspan="2">
													<table class="w100">
														<tbody>
															<tr>
																<th colspan="2" class="kj_tit">
																	开奖网站导航
																</th>
															</tr>
															<tr class="tr_office_site">
																<th class="w50">
																	<a target="_blank" href="http://www.bwlc.net/buy/trax/">北京赛车</a>
																</th>
																<th>
																	<a target="_blank"
																		href="http://www.shishicai.cn/cqssc/touzhu/">重庆时时彩</a>
																</th>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"
			class="conRight" id="conRight">
              <div class="right_corll">-->
			<div style="display: block;" class="header header-bg" id="header">
				<div class="header-content header-bg">
					<div class="header-op">
						<div class="top-op" id="select_sys">
							<a href="<%=basePath%>user/double_disc"
								class="switch nav_longstring switch-on" id="pk10_sys">北京賽車(PK10)</a>
							<a href="<%=basePath%>wait"
								class="switch nav_longstring" id="ssc_sys">重庆时时彩</a>
						</div>
					</div>
					<div class="sub-nav" id="integrate-nav">
						<div style="display: block;" id="elem_pk10"
							class="elem_groupFilter pk10 hide">
							<a href="<%=basePath%>user/double_disc">两面盘</a> |
							<a href="<%=basePath%>user/double_1_5">1 ~ 5</a> |
							<a href="<%=basePath%>user/double_6_10">6 ~ 10</a> |
							<a href="<%=basePath%>user/double_group" class="w5em">冠亚军组合</a>
						</div>
					</div>
				</div>
			</div>
			<div id="layout" class="container">
				<div style="display: block;" class="main-content bet-content"
					dom="layoutright" id="layoutright">
					<div class="mains_corll">
						<div style="" id="rightLoader" dom="right">
							<div id="history" class="history struct_table_center"
								tmp="history">
								<div class="title h_title" style="margin-top: 0px;">
									<span class="sub_title_color">账户历史</span>&nbsp;&nbsp;
									<span id="date" class="hidden" post_date="" cdate=""></span>
									&nbsp;&nbsp;
									<span class="hidden">-未結算注单</span> &nbsp;&nbsp;
									<a href="javascript:void(0)" class="btn_m elem_btn hidden"
										id="reback" bdata="reback,click,reback" status="">返回</a>
								</div>
								<div style="clear: both;"></div>
								<div id="history_result" class="history_tb">
									<table id="lastweek_tb" class="struct_table_five t1 dataArea "
										width="100%">
										<colgroup>
											<col width="20%">
											<col width="20%">
											<col width="20%">
											<col width="20%">
										</colgroup>
										<thead>
											<tr>
												<th>
													日期
												</th>
												<th>
													注數
												</th>
												<th>
													下注金額
												</th>
												<th>
													盈亏
												</th>
											</tr>
										</thead>
										<tbody>
											<fmt:parseNumber var="dayCount" type="number" value="0" />
											<fmt:parseNumber var="cathecticInt" type="number" value="0" />
											<fmt:parseNumber var="winAmt" type="number" value="0" />
											<c:forEach items="${cathecticList }" var="ca" varStatus="st">
												<c:if test="${st.index < 7 }">
													<fmt:parseNumber var="dayCount" type="number" value="${count +  ca.dayCount }" />
													<fmt:parseNumber var="cathecticInt" type="number" value="${cathecticInt +  ca.cathecticInt }" />
													<fmt:parseNumber var="winAmt" type="number" value="${winAmt +  ca.winAmt - ca.cathecticInt}" />
													<tr class="">
														<td>
															<a href="javascript:void(0)"
																class="black" bdata="firstCallBack,click,firstCallBack">
																${ca.dateTime }</a>
														</td>
														<td>
															${ca.dayCount }
														</td>
														<td>
															${ca.cathecticInt}
														</td>
														<td class="${ca.winAmt-ca.cathecticInt<0?'red':''}">
															<fmt:formatNumber value="${ca.winAmt-ca.cathecticInt}" pattern="0.##"/>
														</td>
													</tr>
												</c:if>
											</c:forEach>
										</tbody>
										<tfoot class="bg_g1">
											<tr id="thisweek_total" class="alltotal">
												<td>
													上周
												</td>
												<td>
													${dayCount }
												</td>
												<td>
													${cathecticInt }
												</td>
												<td class="${winAmt<0?'red':''}">
													<fmt:formatNumber value="${winAmt}" pattern="0.##"/>
												</td>
											</tr>
										</tfoot>
									</table>
									<br/>
									<table id="thisweek_tb" class="struct_table_five t1 dataArea"
										style="margin-top: 19px;">
										<colgroup>
											<col width="20%">
											<col width="20%">
											<col width="20%">
											<col width="20%">
										</colgroup>
										<thead>
											<tr>
												<th>
													日期
												</th>
												<th>
													注數
												</th>
												<th>
													下注金額
												</th>
												<th>
													盈亏
												</th>
											</tr>
										</thead>
										<tbody>
											<fmt:parseNumber var="dayCount" type="number" value="0" />
											<fmt:parseNumber var="cathecticInt" type="number" value="0" />
											<fmt:parseNumber var="winAmt" type="number" value="0" />
											<c:forEach items="${cathecticList }" var="ca" varStatus="st">
												<c:if test="${st.index >= 7 }">
													<fmt:parseNumber var="dayCount" type="number" value="${dayCount +  ca.dayCount }" />
													<fmt:parseNumber var="cathecticInt" type="number" value="${cathecticInt +  ca.cathecticInt }" />
													<fmt:parseNumber var="winAmt" type="number" value="${winAmt + ca.winAmt - ca.cathecticInt}" />
													<tr class="">
														<td>
															<a href="javascript:void(0)" class="black" bdata="firstCallBack,click,firstCallBack">${ca.dateTime}</a>
														</td>
														<td>
															${ca.dayCount }
														</td>
														<td>
															${ca.cathecticInt }
														</td>
														<td class="${ca.winAmt-ca.cathecticInt<0?'red':''}">
															<fmt:formatNumber value="${ca.winAmt-ca.cathecticInt}" pattern="0.##"/>
														</td>
													</tr>
												</c:if>
											</c:forEach>
										</tbody>
										<tfoot class="bg_g1">
											<tr id="thisweek_total" class="alltotal">
												<td>
													本周
												</td>
												<td>
													${dayCount }
												</td>
												<td>
													${cathecticInt }
												</td>
												<td class="${winAmt<0?'red':''}">
													<fmt:formatNumber value="${winAmt }" pattern="0.##"/>
												</td>
											</tr>
										</tfoot>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="minWidth"></div>
			</div>
		</div>
	</body>
<script type="text/javascript">
	dataAjax();
	setInterval("dataAjax()",15000);
</script>
</html>